<template>
    <s-theme>
        <s-header backText="优惠券" />
        <uni-segmented-control
            :current="conf.current"
            :values="conf.items"
            style-type="text"
            active-color="#F00804"
            @clickItem="onClickItem"
        />
        <view v-if="conf.current === 0"><text class="content-text">请输入优惠券兑换码</text></view>
        <view v-if="conf.current === 1"><text class="content-text">还没有优惠券</text></view>
        <view v-if="conf.current === 2"><text class="content-text">还没有优惠券</text></view>
    </s-theme>
</template>

<script lang="ts" setup>
import { reactive } from 'vue'

const conf = reactive({
    items: ['未使用', '已使用', '已过期'],
    current: 0
})

const onClickItem = (e: any) => {
    if (conf.current !== e.currentIndex) {
        conf.current = e.currentIndex
    }
}
</script>
<style lang="less" scoped></style>
